package com.cwt.common.utils;

import java.util.Random;

public class MsgUtils {

    /**
     * 获取6位数字的验证码
     *
     * @return
     */
    public static String smsCode() {
        String random=new Random().nextInt( 1000000 ) + "";
        if (random.length() != 6) {
            return smsCode();
        } else {
            return random;
        }
    }

}
